package com.breaktian.demoapp.ui;

import android.os.Bundle;

import com.breaktian.assemble.customviews.viewpager.cursorviewpager.CursorFragment;
import com.breaktian.assemble.customviews.viewpager.cursorviewpager.CursorPagerView;
import com.breaktian.assemble.customviews.viewpager.cursorviewpager.CursorParams;
import com.breaktian.demoapp.R;
import com.breaktian.demoapp.provider.BaseProvider;
import com.breaktian.demoapp.ui.base.BaseActivity;
import com.breaktian.demoapp.ui.fragment.Test1Fragment;
import com.breaktian.demoapp.ui.fragment.Test2Fragment;

import java.util.ArrayList;
import java.util.List;

public class TestCursorViewPagerActivity extends BaseActivity {

    private CursorPagerView cursorPagerView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test_cursor_view_pager);
        showToolbar("cursor viewpager");
        cursorPagerView = (CursorPagerView)findViewById(R.id.cursorPagerView);


        List<CursorFragment> list = new ArrayList<>();
        list.add(new CursorFragment("test1",new Test1Fragment()));
        list.add(new CursorFragment("test2",new Test2Fragment()));
//        list.add(new CursorFragment("test3",new Test3Fragment()));

        CursorParams params = new CursorParams();
        params.setCursorBackgroundColor("#FFFFFF");
        params.setCursorColor("#12C286");
        params.setCursorWidth(60);
        params.setCursorHeight(2);
//        params.setCursorLineHeight(0);
//        params.setCursorLineColor("#ff6600");

        params.setTitleBackgroundColor("FFFFFF");
        params.setTitleHeight(45);
        params.setTitleNormalColor("#464646");
        params.setTitleSelectColor("#12C286");

        cursorPagerView.setFragments(getSupportFragmentManager(), list,params);
//        cursorPagerView.setCursor(60,3,"#12C286","#FFFFFF","#ff6600",0);
//        cursorPagerView.setTitle(45,"#FFFFFF","#464646","#12C286");
    }

    @Override
    protected BaseProvider getProvider() {
        return null;
    }
}
